<template>
  <div id = 'app'>
    <div class="title">标题：{{title}}</div>
    <p   v-html="content"></p>
  </div>
</template>

<script>

import API from '@/utils/backend_api'

export default {
  name: 'bulletinItemDetail',
  components: { },
  data() {
    return {
      title: '',
      content: ''
    }
  },
  created() {
    const id = this.$route.params && this.$route.params.id
    API.bulletin.get(id).then(response => {
      if (response.data.content) {
        this.title = response.data.title
        this.content = response.data.content
      }
    }).catch(err => {
      console.log(err)
    })
  }
}
</script>
<style >
.title{
  margin-top: 20px;
  text-align: center;
  font-weight:bold;
  font-size:18px;
}
</style>
